package com.czk.aop.aspectj;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 在增强类上加注解Order，数字越小越先执行
 * @Author:ChenZhangKun
 * @Date: 2020/11/22 22:29
 */
@Aspect
@Component
@Order(1)
public class UserProxy2 {
    /**
     * 前置通知
     */
    @Before(value = "execution(* com.czk.aop.entity.User.add(..))")
    public void before(){
        System.out.println("before2");
    }
}
